package com.simple.mybaits.simplemybatis.util;

/**
 * @author :  zxj
 * @package :  com.simple.mybaits.simplemybatis.util
 * @date :  2018/5/22
 * @description :
 */
public class ClassUtil {

    /**
     * 获取当前classloader
     */
    public static ClassLoader getClassLoader(){
        return Thread.currentThread().getContextClassLoader();
    }

    /**
     * @param packageName
     */
    public static  Class getClass(String packageName){
        Class clazz = null;
        try {
            clazz =  Class.forName(packageName, true, ClassUtil.getClassLoader());
        }catch (Exception e){
            e.printStackTrace();
        }
        return clazz;
    }


}
